/**
 * massSend-service
 * @authors 杨兴洲（of2502）
 * @date    2017/4/7 15:44
 * @version 1.0
 */
/// <reference path="./massSend-service.d.ts" />
import MassSend from "../model/massSend";

export default class MassSendService {
    /**
     * 创建消息
     * @returns {Promise<any>}
     */
    static async create({userID, message}: createParams): Promise<any> {
        return await MassSend.create({userID, ...message});
    }

    /**
     * 删除消息
     */
    static async deleteMsg(MsgID): Promise<any> {
        return await MassSend.findByIdAndRemove(MsgID);
    }

    /**
     * 删除消息
     */
    static async deleteUserMsg(userID): Promise<any> {
        return await MassSend.remove({userID});
    }

    /**
     * 消息列表（分页）
     */
}
